Introduction and the configuration of the I2C master/slave demo with RTOS support.
More...
Overview
This I2C application demonstrates how KSDK peripheral drivers work on different RTOS. The application acts as both I2C Master and Slave device on different I2C bus, e.g. I2C Master on I2C0 bus, I2C Slave on I2C1 bus. It can be running on one single board or on two different boards. When connecting the two I2C buses on one board, the Master sends commands from I2C0 bus to the slave on I2C1 bus. When connecting the I2C0 bus to the other board's I2C1 bus, the application running on the first board acts as Master, and sends commands to the other board which acts as slave. That means the first board can send commands and get responses from the other board by I2C bus. The basic function of this demo is:
- Read the Kinetis chip UID(low 32bit) from the slave board
- Read the Kinetis chip internal temperature from the slave board
- Control the RED/GREEN/BLUE color LED on/off on slave board
The application creates three different tasks to handle events concurrently:
- Master task: responsible for user interface interaction, running as a I2C Master and acting as a SHELL. It accepts user's command to read the basic chip UID, chip temperature and control the on board LED, and power mode on slave side.
- Slave task: responsible for receiving the command from I2C Master and returning the result to Master.
- ADC sample task: responsible for getting the chip temperature in a period.
- For BM version, Master and Slave task are separated into two projects.
Supported RTOS
- Freescale MQX™ RTOS
- FreeRTOS
- uC/OS-II
- uC/OS-III
- Bare-Metal (no RTOS)
Supported platforms
Currently, this demo supports the following platforms:
- FRDM-K64F120M
- TWR-K64F120M
Serial terminal configuration
The debug serial terminal is configured for the following settings:
- 115200
- 8 data bits
- No parity
- 1 stop bit